<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
	<meta name="description" content="我的账本增加消费类型">

	<link rel="stylesheet" href="../weui/lib/weui.min.css">
	<link rel="stylesheet" href="../weui/css/jquery-weui.css">
	<link rel="stylesheet" href="../css/Gstyle.css">

	<title>增加消费类型-我的账本</title>
</head>
<body>
<div class="weui-tab">

	<div class="weui-tab__bd">
		<h1 style="margin-left: 10px;">费用清单</h1>

		<div class="page__bd">
			<div class="weui-cells" id="consume">

				<!--<div class="weui-cell">
					<div class="weui-cell__bd">
						<p>50.00</p>
						<p class="show2font">夜宵</p>
					</div>
					<div class="weui-cell__ft">
						<p style="font-size: 14px;">2018-12-28 23:20</p>
						<p class="show2font">备注：夜宵，烧烤</p>
					</div>
				</div>-->
			</div>
		</div>
	</div>

	<div class="weui-tabbar">
		<a  class="weui-tabbar__item " href="./index.html">
			<div class="weui-tabbar__icon">
				<img src="../img/icon_nav_msg.png" alt="">
			</div>
			<p class="weui-tabbar__label">增加记录</p>
		</a>
		<!--<a class="weui-tabbar__item " href="addtype.html">
			<div class="weui-tabbar__icon">
				<img src="../img/icon_nav_article.png" alt="">
			</div>
			<p class="weui-tabbar__label">增加类型</p>
		</a>-->
		<a href="./showitem.html" class="weui-tabbar__item weui-bar__item--on" >
			<div class="weui-tabbar__icon">
				<img src="../img/icon_nav_search_bar.png" alt="">
			</div>
			<p class="weui-tabbar__label">查看消费</p>
		</a>
		<a href="./setting.html" class="weui-tabbar__item">
			<div class="weui-tabbar__icon">
				<img src="../img/icon_nav_button.png" alt="">
			</div>
			<p class="weui-tabbar__label">设置</p>
		</a>
	</div>
</div>
<script src="../weui/lib/jquery-2.1.4.js"></script>
<!--<script src="../weui/lib/fastclick.js"></script>-->
<script src="../weui/js/jquery-weui.js"></script>
<script type="text/javascript" src="../weui/lib/weui.min.js"></script>
<script>
    var addhistory=JSON.parse(window.localStorage.getItem('consume'))||[];
	if(addhistory.length==0){
        $('#consume').html('<div><div style="display: block;padding: 50px 0;text-align: center">暂无消费/收入记录</div></dvi></div>')
        $.notification({
            title: "暂无消费/收入记录",
            time:1000,
        });
	}else {
	    var arr=new Array();
	   	$('#consume').html('')
	    for(var i=addhistory.length-1;i>=0;i--){
            arr.push('<div class="weui-cell"> <div class="weui-cell__bd"> ' +
				'<p>'+addhistory[i].addMoney+'</p> <p class="show2font">'+addhistory[i].addType+'</p> </div> ' +
				'<div class="weui-cell__ft"> <p style="font-size: 14px;">'+addhistory[i].time+'</p>' +
				' <p class="show2font">备注：'+addhistory[i].addTxt+'</p> </div> </div>')
		}
        $('#consume').html(arr)
	}
</script>
</body>
</html>


